Shader "Optimized/VertexLit"
{
  Properties
  {
    _Color ("Main Color", Color) = (1,1,1,1)
    _SpecColor ("Spec Color", Color) = (1,1,1,1)
    _Shininess ("Shininess", Range(0.01, 1)) = 0.7
    _MainTex ("Base (RGB)", 2D) = "white" {}
  }
  SubShader
  {
    Tags
    { 
      "RenderType" = "Opaque"
    }
    LOD 100
    Pass // ind: 1, name: 
    {
      Tags
      { 
        "LIGHTMODE" = "Vertex"
        "RenderType" = "Opaque"
      }
      LOD 100
      Fog
      { 
        Mode  Off
      } 
      // m_ProgramMask = 6
      CGPROGRAM
      //#pragma target 4.0
      
      #pragma vertex vert
      #pragma fragment frag
      
      #include "UnityCG.cginc"
      #define conv_mxt4x4_0(mat4x4) float4(mat4x4[0].x,mat4x4[1].x,mat4x4[2].x,mat4x4[3].x)
      #define conv_mxt4x4_1(mat4x4) float4(mat4x4[0].y,mat4x4[1].y,mat4x4[2].y,mat4x4[3].y)
      #define conv_mxt4x4_2(mat4x4) float4(mat4x4[0].z,mat4x4[1].z,mat4x4[2].z,mat4x4[3].z)
      #define conv_mxt4x4_3(mat4x4) float4(mat4x4[0].w,mat4x4[1].w,mat4x4[2].w,mat4x4[3].w)
      
      
      #define CODE_BLOCK_VERTEX
      //uniform float4 unity_LightColor[8];
      //uniform float4 unity_LightPosition[8];
      //uniform float4x4 unity_ObjectToWorld;
      //uniform float4x4 unity_WorldToObject;
      //uniform float4 glstate_lightmodel_ambient;
      //uniform float4x4 unity_MatrixV;
      //uniform float4x4 unity_MatrixInvV;
      //uniform float4x4 unity_MatrixVP;
      uniform float4 _Color;
      uniform float4 _SpecColor;
      uniform float _Shininess;
      uniform float4 _MainTex_ST;
      uniform sampler2D _MainTex;
      struct appdata_t
      {
          float4 vertex :POSITION;
          float3 normal :NORMAL;
          float4 texcoord :TEXCOORD0;
      };
      
      struct OUT_Data_Vert
      {
          float4 xlv_COLOR0 :COLOR0;
          float3 xlv_COLOR1 :COLOR1;
          float2 xlv_TEXCOORD0 :TEXCOORD0;
          float4 vertex :SV_POSITION;
      };
      
      struct v2f
      {
          float4 xlv_COLOR0 :COLOR0;
          float3 xlv_COLOR1 :COLOR1;
          float2 xlv_TEXCOORD0 :TEXCOORD0;
      };
      
      struct OUT_Data_Frag
      {
          float4 color :SV_Target0;
      };
      
      OUT_Data_Vert vert(appdata_t in_v)
      {
          OUT_Data_Vert out_v;
          float4x4 m_1;
          m_1 = mul(unity_WorldToObject, unity_MatrixInvV);
          float4 tmpvar_2;
          float4 tmpvar_3;
          float4 tmpvar_4;
          tmpvar_2.x = conv_mxt4x4_0(m_1).x;
          tmpvar_2.y = conv_mxt4x4_1(m_1).x;
          tmpvar_2.z = conv_mxt4x4_2(m_1).x;
          tmpvar_2.w = conv_mxt4x4_3(m_1).x;
          tmpvar_3.x = conv_mxt4x4_0(m_1).y;
          tmpvar_3.y = conv_mxt4x4_1(m_1).y;
          tmpvar_3.z = conv_mxt4x4_2(m_1).y;
          tmpvar_3.w = conv_mxt4x4_3(m_1).y;
          tmpvar_4.x = conv_mxt4x4_0(m_1).z;
          tmpvar_4.y = conv_mxt4x4_1(m_1).z;
          tmpvar_4.z = conv_mxt4x4_2(m_1).z;
          tmpvar_4.w = conv_mxt4x4_3(m_1).z;
          float3 tmpvar_5;
          tmpvar_5 = in_v.vertex.xyz;
          float shininess_7;
          float3 specColor_8;
          float3 lcolor_9;
          float3 viewDir_10;
          float3 eyeNormal_11;
          float4 color_12;
          color_12 = float4(0, 0, 0, 1.1);
          float4 tmpvar_13;
          tmpvar_13.w = 1;
          tmpvar_13.xyz = float3(tmpvar_5);
          float3x3 tmpvar_14;
          tmpvar_14[0] = tmpvar_2.xyz;
          tmpvar_14[1] = tmpvar_3.xyz;
          tmpvar_14[2] = tmpvar_4.xyz;
          float3 tmpvar_15;
          tmpvar_15 = normalize(mul(tmpvar_14, in_v.normal));
          eyeNormal_11 = tmpvar_15;
          float3 tmpvar_16;
          tmpvar_16 = normalize(mul(mul(unity_MatrixV, unity_ObjectToWorld), tmpvar_13).xyz);
          viewDir_10 = (-tmpvar_16);
          lcolor_9 = (_Color.xyz * glstate_lightmodel_ambient.xyz);
          specColor_8 = float3(0, 0, 0);
          shininess_7 = (_Shininess * 128);
          int il_6 = 0;
          while((il_6<8))
          {
              float3 tmpvar_17;
              tmpvar_17 = unity_LightPosition[il_6].xyz;
              float3 dirToLight_18;
              dirToLight_18 = tmpvar_17;
              float3 specColor_19;
              specColor_19 = specColor_8;
              float tmpvar_20;
              tmpvar_20 = max(dot(eyeNormal_11, dirToLight_18), 0);
              float3 tmpvar_21;
              tmpvar_21 = ((tmpvar_20 * _Color.xyz) * unity_LightColor[il_6].xyz);
              if((tmpvar_20>0))
              {
                  specColor_19 = (specColor_8 + ((0.5 * clamp(pow(max(dot(eyeNormal_11, normalize((dirToLight_18 + viewDir_10))), 0), shininess_7), 0, 1)) * unity_LightColor[il_6].xyz));
              }
              specColor_8 = specColor_19;
              lcolor_9 = (lcolor_9 + min((tmpvar_21 * 0.5), float3(1, 1, 1)));
              il_6 = (il_6 + 1);
          }
          color_12.xyz = float3(lcolor_9);
          color_12.w = _Color.w;
          specColor_8 = (specColor_8 * _SpecColor.xyz);
          float4 tmpvar_22;
          float4 tmpvar_23;
          tmpvar_23 = clamp(color_12, 0, 1);
          tmpvar_22 = tmpvar_23;
          float3 tmpvar_24;
          float3 tmpvar_25;
          tmpvar_25 = clamp(specColor_8, 0, 1);
          tmpvar_24 = tmpvar_25;
          float4 tmpvar_26;
          tmpvar_26.w = 1;
          tmpvar_26.xyz = float3(tmpvar_5);
          out_v.xlv_COLOR0 = tmpvar_22;
          out_v.xlv_COLOR1 = tmpvar_24;
          out_v.xlv_TEXCOORD0 = TRANSFORM_TEX(in_v.texcoord.xy, _MainTex);
          out_v.vertex = mul(unity_MatrixVP, mul(unity_ObjectToWorld, tmpvar_26));
          return out_v;
      }
      
      #define CODE_BLOCK_FRAGMENT
      OUT_Data_Frag frag(v2f in_f)
      {
          OUT_Data_Frag out_f;
          float4 col_1;
          float4 tmpvar_2;
          tmpvar_2 = tex2D(_MainTex, in_f.xlv_TEXCOORD0);
          col_1.xyz = (tmpvar_2 * in_f.xlv_COLOR0).xyz;
          col_1.xyz = (col_1 * 2).xyz;
          col_1.w = (tmpvar_2.w * in_f.xlv_COLOR0.w);
          col_1.xyz = (col_1.xyz + in_f.xlv_COLOR1);
          out_f.color = col_1;
          return out_f;
      }
      
      
      ENDCG
      
    } // end phase
    Pass // ind: 2, name: 
    {
      Tags
      { 
        "LIGHTMODE" = "VertexLM"
        "RenderType" = "Opaque"
      }
      LOD 100
      Fog
      { 
        Mode  Off
      } 
      // m_ProgramMask = 6
      CGPROGRAM
      //#pragma target 4.0
      
      #pragma vertex vert
      #pragma fragment frag
      
      #include "UnityCG.cginc"
      
      
      #define CODE_BLOCK_VERTEX
      //uniform float4x4 unity_ObjectToWorld;
      //uniform float4x4 unity_MatrixVP;
      uniform float4 unity_LightmapST;
      uniform float4 _MainTex_ST;
      uniform sampler2D unity_Lightmap;
      uniform sampler2D _MainTex;
      uniform float4 _Color;
      struct appdata_t
      {
          float4 vertex :POSITION;
          float4 color :COLOR;
          float4 texcoord :TEXCOORD0;
          float4 texcoord1 :TEXCOORD1;
      };
      
      struct OUT_Data_Vert
      {
          float4 xlv_COLOR0 :COLOR0;
          float2 xlv_TEXCOORD0 :TEXCOORD0;
          float2 xlv_TEXCOORD1 :TEXCOORD1;
          float4 vertex :SV_POSITION;
      };
      
      struct v2f
      {
          float4 xlv_COLOR0 :COLOR0;
          float2 xlv_TEXCOORD0 :TEXCOORD0;
          float2 xlv_TEXCOORD1 :TEXCOORD1;
      };
      
      struct OUT_Data_Frag
      {
          float4 color :SV_Target0;
      };
      
      OUT_Data_Vert vert(appdata_t in_v)
      {
          OUT_Data_Vert out_v;
          float4 tmpvar_1;
          float4 tmpvar_2;
          tmpvar_2 = clamp(in_v.color, 0, 1);
          tmpvar_1 = tmpvar_2;
          float4 tmpvar_3;
          tmpvar_3.w = 1;
          tmpvar_3.xyz = in_v.vertex.xyz;
          out_v.xlv_COLOR0 = tmpvar_1;
          out_v.xlv_TEXCOORD0 = ((in_v.texcoord1.xy * unity_LightmapST.xy) + unity_LightmapST.zw);
          out_v.xlv_TEXCOORD1 = TRANSFORM_TEX(in_v.texcoord.xy, _MainTex);
          out_v.vertex = mul(unity_MatrixVP, mul(unity_ObjectToWorld, tmpvar_3));
          return out_v;
      }
      
      #define CODE_BLOCK_FRAGMENT
      OUT_Data_Frag frag(v2f in_f)
      {
          OUT_Data_Frag out_f;
          float4 tex_1;
          float4 col_2;
          float4 tmpvar_3;
          tmpvar_3 = tex2D(unity_Lightmap, in_f.xlv_TEXCOORD0);
          tex_1 = tmpvar_3;
          col_2 = (tex_1 * _Color);
          float4 tmpvar_4;
          tmpvar_4 = tex2D(_MainTex, in_f.xlv_TEXCOORD1);
          tex_1 = tmpvar_4;
          col_2.xyz = (tmpvar_4 * col_2).xyz;
          col_2.xyz = (col_2 * 2).xyz;
          col_2.w = (tmpvar_4.w * in_f.xlv_COLOR0.w);
          out_f.color = col_2;
          return out_f;
      }
      
      
      ENDCG
      
    } // end phase
    Pass // ind: 3, name: 
    {
      Tags
      { 
        "LIGHTMODE" = "VertexLMRGBM"
        "RenderType" = "Opaque"
      }
      LOD 100
      Fog
      { 
        Mode  Off
      } 
      // m_ProgramMask = 6
      CGPROGRAM
      //#pragma target 4.0
      
      #pragma vertex vert
      #pragma fragment frag
      
      #include "UnityCG.cginc"
      
      
      #define CODE_BLOCK_VERTEX
      //uniform float4x4 unity_ObjectToWorld;
      //uniform float4x4 unity_MatrixVP;
      uniform float4 unity_LightmapST;
      uniform float4 unity_Lightmap_ST;
      uniform float4 _MainTex_ST;
      uniform sampler2D unity_Lightmap;
      uniform sampler2D _MainTex;
      uniform float4 _Color;
      struct appdata_t
      {
          float4 vertex :POSITION;
          float4 color :COLOR;
          float4 texcoord :TEXCOORD0;
          float4 texcoord1 :TEXCOORD1;
      };
      
      struct OUT_Data_Vert
      {
          float4 xlv_COLOR0 :COLOR0;
          float2 xlv_TEXCOORD0 :TEXCOORD0;
          float2 xlv_TEXCOORD1 :TEXCOORD1;
          float2 xlv_TEXCOORD2 :TEXCOORD2;
          float4 vertex :SV_POSITION;
      };
      
      struct v2f
      {
          float4 xlv_COLOR0 :COLOR0;
          float2 xlv_TEXCOORD0 :TEXCOORD0;
          float2 xlv_TEXCOORD2 :TEXCOORD2;
      };
      
      struct OUT_Data_Frag
      {
          float4 color :SV_Target0;
      };
      
      OUT_Data_Vert vert(appdata_t in_v)
      {
          OUT_Data_Vert out_v;
          float4 tmpvar_1;
          float4 tmpvar_2;
          tmpvar_2 = clamp(in_v.color, 0, 1);
          tmpvar_1 = tmpvar_2;
          float4 tmpvar_3;
          tmpvar_3.w = 1;
          tmpvar_3.xyz = in_v.vertex.xyz;
          out_v.xlv_COLOR0 = tmpvar_1;
          out_v.xlv_TEXCOORD0 = ((in_v.texcoord1.xy * unity_LightmapST.xy) + unity_LightmapST.zw);
          out_v.xlv_TEXCOORD1 = TRANSFORM_TEX(in_v.texcoord1.xy, unity_Lightmap);
          out_v.xlv_TEXCOORD2 = TRANSFORM_TEX(in_v.texcoord.xy, _MainTex);
          out_v.vertex = mul(unity_MatrixVP, mul(unity_ObjectToWorld, tmpvar_3));
          return out_v;
      }
      
      #define CODE_BLOCK_FRAGMENT
      OUT_Data_Frag frag(v2f in_f)
      {
          OUT_Data_Frag out_f;
          float4 tex_1;
          float4 col_2;
          float4 tmpvar_3;
          tmpvar_3 = tex2D(unity_Lightmap, in_f.xlv_TEXCOORD0);
          tex_1 = tmpvar_3;
          col_2 = (tex_1 * tex_1.w);
          col_2 = (col_2 * 2);
          col_2 = (col_2 * _Color);
          float4 tmpvar_4;
          tmpvar_4 = tex2D(_MainTex, in_f.xlv_TEXCOORD2);
          tex_1 = tmpvar_4;
          col_2.xyz = (tmpvar_4 * col_2).xyz;
          col_2.xyz = (col_2 * 4).xyz;
          col_2.w = (tmpvar_4.w * in_f.xlv_COLOR0.w);
          out_f.color = col_2;
          return out_f;
      }
      
      
      ENDCG
      
    } // end phase
    Pass // ind: 4, name: ShadowCaster
    {
      Name "ShadowCaster"
      Tags
      { 
        "LIGHTMODE" = "SHADOWCASTER"
        "RenderType" = "Opaque"
        "SHADOWSUPPORT" = "true"
      }
      LOD 100
      Cull Off
      Offset 1, 1
      Fog
      { 
        Mode  Off
      } 
      // m_ProgramMask = 6
      CGPROGRAM
      #pragma multi_compile SHADOWS_DEPTH
      //#pragma target 4.0
      
      #pragma vertex vert
      #pragma fragment frag
      
      #include "UnityCG.cginc"
      
      
      #define CODE_BLOCK_VERTEX
      //uniform float4 unity_LightShadowBias;
      //uniform float4x4 unity_ObjectToWorld;
      //uniform float4x4 unity_MatrixVP;
      struct appdata_t
      {
          float4 vertex :POSITION;
      };
      
      struct OUT_Data_Vert
      {
          float4 vertex :SV_POSITION;
      };
      
      struct v2f
      {
          float4 vertex :Position;
      };
      
      struct OUT_Data_Frag
      {
          float4 color :SV_Target0;
      };
      
      OUT_Data_Vert vert(appdata_t in_v)
      {
          OUT_Data_Vert out_v;
          float4 tmpvar_1;
          float4 tmpvar_2;
          tmpvar_2.w = 1;
          tmpvar_2.xyz = in_v.vertex.xyz;
          tmpvar_1 = mul(unity_MatrixVP, mul(unity_ObjectToWorld, tmpvar_2));
          float4 clipPos_3;
          clipPos_3.xyw = tmpvar_1.xyw;
          clipPos_3.z = (tmpvar_1.z + clamp((unity_LightShadowBias.x / tmpvar_1.w), 0, 1));
          clipPos_3.z = lerp(clipPos_3.z, max(clipPos_3.z, (-tmpvar_1.w)), unity_LightShadowBias.y);
          out_v.vertex = clipPos_3;
          return out_v;
      }
      
      #define CODE_BLOCK_FRAGMENT
      OUT_Data_Frag frag(v2f in_f)
      {
          OUT_Data_Frag out_f;
          out_f.color = float4(0, 0, 0, 0);
          return out_f;
      }
      
      
      ENDCG
      
    } // end phase
    Pass // ind: 5, name: ShadowCollector
    {
      Name "ShadowCollector"
      Tags
      { 
        "LIGHTMODE" = "SHADOWCOLLECTOR"
        "RenderType" = "Opaque"
      }
      LOD 100
      Fog
      { 
        Mode  Off
      } 
      // m_ProgramMask = 6
      CGPROGRAM
      //#pragma target 4.0
      
      #pragma vertex vert
      #pragma fragment frag
      
      #include "UnityCG.cginc"
      
      
      #define CODE_BLOCK_VERTEX
      //uniform float4x4x4 unity_WorldToShadow;
      //uniform float4x4 unity_ObjectToWorld;
      //uniform float4x4 unity_MatrixV;
      //uniform float4x4 unity_MatrixVP;
      //uniform float4 _ProjectionParams;
      //uniform float4 _LightSplitsNear;
      //uniform float4 _LightSplitsFar;
      //uniform float4 _LightShadowData;
      uniform sampler2D _ShadowMapTexture;
      struct appdata_t
      {
          float4 vertex :POSITION;
      };
      
      struct OUT_Data_Vert
      {
          float3 xlv_TEXCOORD0 :TEXCOORD0;
          float3 xlv_TEXCOORD1 :TEXCOORD1;
          float3 xlv_TEXCOORD2 :TEXCOORD2;
          float3 xlv_TEXCOORD3 :TEXCOORD3;
          float4 xlv_TEXCOORD4 :TEXCOORD4;
          float4 vertex :SV_POSITION;
      };
      
      struct v2f
      {
          float3 xlv_TEXCOORD0 :TEXCOORD0;
          float3 xlv_TEXCOORD1 :TEXCOORD1;
          float3 xlv_TEXCOORD2 :TEXCOORD2;
          float3 xlv_TEXCOORD3 :TEXCOORD3;
          float4 xlv_TEXCOORD4 :TEXCOORD4;
      };
      
      struct OUT_Data_Frag
      {
          float4 color :SV_Target0;
      };
      
      OUT_Data_Vert vert(appdata_t in_v)
      {
          OUT_Data_Vert out_v;
          float4 tmpvar_1;
          tmpvar_1 = in_v.vertex;
          float4 tmpvar_2;
          float4 tmpvar_3;
          tmpvar_3.w = 1;
          tmpvar_3.xyz = tmpvar_1.xyz;
          float4 tmpvar_4;
          tmpvar_4 = mul(unity_ObjectToWorld, in_v.vertex);
          tmpvar_2.xyz = tmpvar_4.xyz;
          float4 tmpvar_5;
          tmpvar_5.w = 1;
          tmpvar_5.xyz = tmpvar_1.xyz;
          tmpvar_2.w = (-mul(unity_MatrixV, mul(unity_ObjectToWorld, tmpvar_5)).z);
          out_v.vertex = mul(unity_MatrixVP, mul(unity_ObjectToWorld, tmpvar_3));
          out_v.xlv_TEXCOORD0 = mul(((float4[16])unity_WorldToShadow)[0], tmpvar_4).xyz;
          out_v.xlv_TEXCOORD1 = mul(((float4[16])unity_WorldToShadow)[1], tmpvar_4).xyz;
          out_v.xlv_TEXCOORD2 = mul(((float4[16])unity_WorldToShadow)[2], tmpvar_4).xyz;
          out_v.xlv_TEXCOORD3 = mul(((float4[16])unity_WorldToShadow)[3], tmpvar_4).xyz;
          out_v.xlv_TEXCOORD4 = tmpvar_2;
          return out_v;
      }
      
      #define CODE_BLOCK_FRAGMENT
      OUT_Data_Frag frag(v2f in_f)
      {
          OUT_Data_Frag out_f;
          float4 tmpvar_1;
          float4 res_2;
          float shadow_3;
          float4 zFar_4;
          float4 zNear_5;
          float4 tmpvar_6;
          tmpvar_6 = bool4(in_f.xlv_TEXCOORD4.wwww >= _LightSplitsNear);
          float4 tmpvar_7;
          tmpvar_7 = float4(tmpvar_6);
          zNear_5 = tmpvar_7;
          float4 tmpvar_8;
          tmpvar_8 = bool4(in_f.xlv_TEXCOORD4.wwww < _LightSplitsFar);
          float4 tmpvar_9;
          tmpvar_9 = float4(tmpvar_8);
          zFar_4 = tmpvar_9;
          float4 tmpvar_10;
          tmpvar_10 = (zNear_5 * zFar_4);
          float tmpvar_11;
          tmpvar_11 = clamp(((in_f.xlv_TEXCOORD4.w * _LightShadowData.z) + _LightShadowData.w), 0, 1);
          float4 tmpvar_12;
          tmpvar_12.w = 1;
          tmpvar_12.xyz = ((((in_f.xlv_TEXCOORD0 * tmpvar_10.x) + (in_f.xlv_TEXCOORD1 * tmpvar_10.y)) + (in_f.xlv_TEXCOORD2 * tmpvar_10.z)) + (in_f.xlv_TEXCOORD3 * tmpvar_10.w));
          float4 tmpvar_13;
          tmpvar_13 = tex2D(_ShadowMapTexture, tmpvar_12.xy);
          float tmpvar_14;
          if((tmpvar_13.x<tmpvar_12.z))
          {
              tmpvar_14 = 0;
          }
          else
          {
              tmpvar_14 = 1;
          }
          shadow_3 = (_LightShadowData.x + (tmpvar_14 * (1 - _LightShadowData.x)));
          res_2.x = clamp((shadow_3 + tmpvar_11), 0, 1);
          res_2.y = 1;
          float2 enc_15;
          float2 tmpvar_16;
          tmpvar_16 = frac((float2(1, 255) * (1 - (in_f.xlv_TEXCOORD4.w * _ProjectionParams.w))));
          enc_15.y = tmpvar_16.y;
          enc_15.x = (tmpvar_16.x - (tmpvar_16.y * 0.003921569));
          res_2.zw = enc_15;
          tmpvar_1 = res_2;
          out_f.color = tmpvar_1;
          return out_f;
      }
      
      
      ENDCG
      
    } // end phase
  }
  SubShader
  {
    Tags
    { 
      "RenderType" = "Opaque"
    }
    LOD 100
    Pass // ind: 1, name: 
    {
      Tags
      { 
        "LIGHTMODE" = "Vertex"
        "RenderType" = "Opaque"
      }
      LOD 100
      Fog
      { 
        Mode  Off
      } 
      // m_ProgramMask = 6
      CGPROGRAM
      //#pragma target 4.0
      
      #pragma vertex vert
      #pragma fragment frag
      
      #include "UnityCG.cginc"
      #define conv_mxt4x4_0(mat4x4) float4(mat4x4[0].x,mat4x4[1].x,mat4x4[2].x,mat4x4[3].x)
      #define conv_mxt4x4_1(mat4x4) float4(mat4x4[0].y,mat4x4[1].y,mat4x4[2].y,mat4x4[3].y)
      #define conv_mxt4x4_2(mat4x4) float4(mat4x4[0].z,mat4x4[1].z,mat4x4[2].z,mat4x4[3].z)
      #define conv_mxt4x4_3(mat4x4) float4(mat4x4[0].w,mat4x4[1].w,mat4x4[2].w,mat4x4[3].w)
      
      
      #define CODE_BLOCK_VERTEX
      //uniform float4 unity_LightColor[8];
      //uniform float4 unity_LightPosition[8];
      //uniform float4x4 unity_ObjectToWorld;
      //uniform float4x4 unity_WorldToObject;
      //uniform float4 glstate_lightmodel_ambient;
      //uniform float4x4 unity_MatrixV;
      //uniform float4x4 unity_MatrixInvV;
      //uniform float4x4 unity_MatrixVP;
      uniform float4 _Color;
      uniform float4 _SpecColor;
      uniform float _Shininess;
      uniform float4 _MainTex_ST;
      uniform sampler2D _MainTex;
      struct appdata_t
      {
          float4 vertex :POSITION;
          float3 normal :NORMAL;
          float4 texcoord :TEXCOORD0;
      };
      
      struct OUT_Data_Vert
      {
          float4 xlv_COLOR0 :COLOR0;
          float3 xlv_COLOR1 :COLOR1;
          float2 xlv_TEXCOORD0 :TEXCOORD0;
          float4 vertex :SV_POSITION;
      };
      
      struct v2f
      {
          float4 xlv_COLOR0 :COLOR0;
          float3 xlv_COLOR1 :COLOR1;
          float2 xlv_TEXCOORD0 :TEXCOORD0;
      };
      
      struct OUT_Data_Frag
      {
          float4 color :SV_Target0;
      };
      
      OUT_Data_Vert vert(appdata_t in_v)
      {
          OUT_Data_Vert out_v;
          float4x4 m_1;
          m_1 = mul(unity_WorldToObject, unity_MatrixInvV);
          float4 tmpvar_2;
          float4 tmpvar_3;
          float4 tmpvar_4;
          tmpvar_2.x = conv_mxt4x4_0(m_1).x;
          tmpvar_2.y = conv_mxt4x4_1(m_1).x;
          tmpvar_2.z = conv_mxt4x4_2(m_1).x;
          tmpvar_2.w = conv_mxt4x4_3(m_1).x;
          tmpvar_3.x = conv_mxt4x4_0(m_1).y;
          tmpvar_3.y = conv_mxt4x4_1(m_1).y;
          tmpvar_3.z = conv_mxt4x4_2(m_1).y;
          tmpvar_3.w = conv_mxt4x4_3(m_1).y;
          tmpvar_4.x = conv_mxt4x4_0(m_1).z;
          tmpvar_4.y = conv_mxt4x4_1(m_1).z;
          tmpvar_4.z = conv_mxt4x4_2(m_1).z;
          tmpvar_4.w = conv_mxt4x4_3(m_1).z;
          float3 tmpvar_5;
          tmpvar_5 = in_v.vertex.xyz;
          float shininess_7;
          float3 specColor_8;
          float3 lcolor_9;
          float3 viewDir_10;
          float3 eyeNormal_11;
          float4 color_12;
          color_12 = float4(0, 0, 0, 1.1);
          float4 tmpvar_13;
          tmpvar_13.w = 1;
          tmpvar_13.xyz = float3(tmpvar_5);
          float3x3 tmpvar_14;
          tmpvar_14[0] = tmpvar_2.xyz;
          tmpvar_14[1] = tmpvar_3.xyz;
          tmpvar_14[2] = tmpvar_4.xyz;
          float3 tmpvar_15;
          tmpvar_15 = normalize(mul(tmpvar_14, in_v.normal));
          eyeNormal_11 = tmpvar_15;
          float3 tmpvar_16;
          tmpvar_16 = normalize(mul(mul(unity_MatrixV, unity_ObjectToWorld), tmpvar_13).xyz);
          viewDir_10 = (-tmpvar_16);
          lcolor_9 = (_Color.xyz * glstate_lightmodel_ambient.xyz);
          specColor_8 = float3(0, 0, 0);
          shininess_7 = (_Shininess * 128);
          int il_6 = 0;
          while((il_6<8))
          {
              float3 tmpvar_17;
              tmpvar_17 = unity_LightPosition[il_6].xyz;
              float3 dirToLight_18;
              dirToLight_18 = tmpvar_17;
              float3 specColor_19;
              specColor_19 = specColor_8;
              float tmpvar_20;
              tmpvar_20 = max(dot(eyeNormal_11, dirToLight_18), 0);
              float3 tmpvar_21;
              tmpvar_21 = ((tmpvar_20 * _Color.xyz) * unity_LightColor[il_6].xyz);
              if((tmpvar_20>0))
              {
                  specColor_19 = (specColor_8 + ((0.5 * clamp(pow(max(dot(eyeNormal_11, normalize((dirToLight_18 + viewDir_10))), 0), shininess_7), 0, 1)) * unity_LightColor[il_6].xyz));
              }
              specColor_8 = specColor_19;
              lcolor_9 = (lcolor_9 + min((tmpvar_21 * 0.5), float3(1, 1, 1)));
              il_6 = (il_6 + 1);
          }
          color_12.xyz = float3(lcolor_9);
          color_12.w = _Color.w;
          specColor_8 = (specColor_8 * _SpecColor.xyz);
          float4 tmpvar_22;
          float4 tmpvar_23;
          tmpvar_23 = clamp(color_12, 0, 1);
          tmpvar_22 = tmpvar_23;
          float3 tmpvar_24;
          float3 tmpvar_25;
          tmpvar_25 = clamp(specColor_8, 0, 1);
          tmpvar_24 = tmpvar_25;
          float4 tmpvar_26;
          tmpvar_26.w = 1;
          tmpvar_26.xyz = float3(tmpvar_5);
          out_v.xlv_COLOR0 = tmpvar_22;
          out_v.xlv_COLOR1 = tmpvar_24;
          out_v.xlv_TEXCOORD0 = TRANSFORM_TEX(in_v.texcoord.xy, _MainTex);
          out_v.vertex = mul(unity_MatrixVP, mul(unity_ObjectToWorld, tmpvar_26));
          return out_v;
      }
      
      #define CODE_BLOCK_FRAGMENT
      OUT_Data_Frag frag(v2f in_f)
      {
          OUT_Data_Frag out_f;
          float4 col_1;
          float4 tmpvar_2;
          tmpvar_2 = tex2D(_MainTex, in_f.xlv_TEXCOORD0);
          col_1.xyz = (tmpvar_2 * in_f.xlv_COLOR0).xyz;
          col_1.xyz = (col_1 * 2).xyz;
          col_1.w = (tmpvar_2.w * in_f.xlv_COLOR0.w);
          col_1.xyz = (col_1.xyz + in_f.xlv_COLOR1);
          out_f.color = col_1;
          return out_f;
      }
      
      
      ENDCG
      
    } // end phase
    Pass // ind: 2, name: 
    {
      Tags
      { 
        "LIGHTMODE" = "VertexLM"
        "RenderType" = "Opaque"
      }
      LOD 100
      Fog
      { 
        Mode  Off
      } 
      // m_ProgramMask = 6
      CGPROGRAM
      //#pragma target 4.0
      
      #pragma vertex vert
      #pragma fragment frag
      
      #include "UnityCG.cginc"
      
      
      #define CODE_BLOCK_VERTEX
      //uniform float4x4 unity_ObjectToWorld;
      //uniform float4x4 unity_MatrixVP;
      uniform float4 unity_LightmapST;
      uniform sampler2D unity_Lightmap;
      uniform float4 _Color;
      struct appdata_t
      {
          float4 vertex :POSITION;
          float4 texcoord1 :TEXCOORD1;
      };
      
      struct OUT_Data_Vert
      {
          float4 xlv_COLOR0 :COLOR0;
          float2 xlv_TEXCOORD0 :TEXCOORD0;
          float4 vertex :SV_POSITION;
      };
      
      struct v2f
      {
          float2 xlv_TEXCOORD0 :TEXCOORD0;
      };
      
      struct OUT_Data_Frag
      {
          float4 color :SV_Target0;
      };
      
      OUT_Data_Vert vert(appdata_t in_v)
      {
          OUT_Data_Vert out_v;
          float4 tmpvar_1;
          float4 tmpvar_2;
          tmpvar_2 = clamp(float4(0, 0, 0, 1.1), 0, 1);
          tmpvar_1 = tmpvar_2;
          float4 tmpvar_3;
          tmpvar_3.w = 1;
          tmpvar_3.xyz = in_v.vertex.xyz;
          out_v.xlv_COLOR0 = tmpvar_1;
          out_v.xlv_TEXCOORD0 = ((in_v.texcoord1.xy * unity_LightmapST.xy) + unity_LightmapST.zw);
          out_v.vertex = mul(unity_MatrixVP, mul(unity_ObjectToWorld, tmpvar_3));
          return out_v;
      }
      
      #define CODE_BLOCK_FRAGMENT
      OUT_Data_Frag frag(v2f in_f)
      {
          OUT_Data_Frag out_f;
          float4 tex_1;
          float4 tmpvar_2;
          tmpvar_2 = tex2D(unity_Lightmap, in_f.xlv_TEXCOORD0);
          tex_1 = tmpvar_2;
          float4 tmpvar_3;
          tmpvar_3 = (tex_1 * _Color);
          out_f.color = tmpvar_3;
          return out_f;
      }
      
      
      ENDCG
      
    } // end phase
  }
  FallBack Off
}
